using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;

public class Lesson20Work 
{
   private static Lesson20Work instance=new Lesson20Work();
    public static Lesson20Work Instance => instance;
    private Lesson20Work() { }

    public void LoadScene(string name,UnityAction callback)
    {
        AsyncOperation ao=SceneManager.LoadSceneAsync(name);
        ao.completed += (a)=>
        {
            callback();
        };
    }
}
